package com.javax.naming;

import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

public class NamingServer {

	public static void main(String[] args) {
		try {
			Registry registry = LocateRegistry.createRegistry(6666); // 创建一个8520的端口
			NamingRegisterImp register = new NamingRegisterImp();
			registry.bind("REGISTER", register);
			System.out.println("success!!!");
		} catch (RemoteException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
		}
	}
}
